home *** CD-ROM | disk | FTP | other *** search
/ Commodore Disk User Volume 1 #3 / Commodore_Disk_User_Vol.1_3_1988_-.d64 / elephant hunt (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  3KB  |  111 lines

  1. 0 rem   ********************
  2. 1 rem   *                  *
  3. 2 rem   *  elephant  hunt  *
  4. 3 rem   *  --------------  *
  5. 4 rem   * by paul williams *
  6. 5 rem   *                  *
  7. 6 rem   * demonstration of *
  8. 7 rem   *  basic complier  *
  9. 8 rem   *                  *
  10. 9 rem   ********************
  11. 10 deffna(x)=peek(56324)
  12. 20 poke650,255
  13. 30 fd=100
  14. 40 ne=8
  15. 50 poke53280,0:poke53281,0
  16. 100 gosub560
  17. 110 print"[147]    score:   you:"vv" elephants:"bb
  18. 111 ifvv+bb=0thennn=0:goto115
  19. 112 nn=vv*100/(vv+bb)
  20. 115 print"    giving you a rating of:"nn"[157]%
  21. 116 [153]""
  22. 120 [153]"    *** forest density:   ";fd;"***"
  23. 121 [153]"    *** number of elephants:";ne;"***"
  24. 122 [153]"  press [return] to keep these values"
  25. 125 [133]"forest density";op:[139]op[177]0[175]op[179]700[167]fd[178]op
  26. 127 [133]"number of elephants";op:[139]op[177]0[175]op[179]100[167]ne[178]op
  27. 140 [143]
  28. 150 [153]"sysload"
  29. 151 sp[178]32:sc[178]1024:gg[178]81:uu[178]83:ft[178]40:ch[178]102:fi[178]1126:n[178]1:dq[178]54272
  30. 180 [134]e(120)
  31. 190 [129]x[178]sc[164]sc[170]39:[151]x[170]dq,5:[151]x[170]960[170]dq,5:[151]x,ch:[151]x[170]960,ch:[130]
  32. 200 [129]x[178]1064[164]1944[169]ft:[151]x[170]dq,5:[151]x[170]39[170]dq,5:[151]x,ch:[151]x[170]39,ch:[130]
  33. 210 [129]x[178]n[164]fd:i[178]sc[170][165]a(0)[172]3[170]([165]a(0)[175]191):[151]i[170]dq,5:[151]i,ch:[130]
  34. 220 [151]fi,43:[151]fi[170]dq,1
  35. 230 p[178]sc[170][181]([165]a(0)[175]15)[170]882:[151]p,uu:[151]p[170]dq,7
  36. 240 [129]x[178]n[164]ne
  37. 250 e(x)[178]sc[170][181]([165]a(0)[170][165]a(0)[170][165]a(0)[170]40)
  38. 260 [139][194](e(x))[179][177]sp[167]250
  39. 270 [130]
  40. 280 [141]330
  41. 290 en[178]en[170]n:[139]en[177]ne[167]en[178]n
  42. 300 q[178]e(en):[141]410:e(en)[178]q
  43. 310 [139]q[178]p[167]510
  44. 320 [137]280
  45. 330 p1[178]p
  46. 340 [161]t$
  47. 341 tt[178]0
  48. 342 [139]t$[178]"z"[167]tt[178]39:[137]360
  49. 343 [139]t$[178]"x"[167]tt[178]40:[137]360
  50. 344 [139]t$[178]"c"[167]tt[178]41:[137]360
  51. 345 [139]t$[178]"a"[167]tt[178][171]1:[137]360
  52. 346 [139]t$[178]"s"[167]tt[178]0:[137]360
  53. 347 [139]t$[178]"d"[167]tt[178]1:[137]360
  54. 348 [139]t$[178]"q"[167]tt[178][171]41:[137]360
  55. 349 [139]t$[178]"w"[167]tt[178][171]40:[137]360
  56. 350 [139]t$[178]"e"[167]tt[178][171]39:[137]360
  57. 351 [139]t$[178]""[167][153]"load":[128]
  58. 360 p[178]p[170]tt
  59. 370 [139][194](p)[178]43[167]540
  60. 380 [139][194](p)[179][177]sp[167]p[178]p1
  61. 390 [151]p,uu:[139]p1[179][177]p[167][151]p1,sp
  62. 400 [142]
  63. 410 q0[178]q:q1[178]q[171]sc:p1[178]p[171]sc
  64. 420 qy[178][181](q1[173]ft):py[178][181](p1[173]ft)
  65. 430 qx[178]q1[171]qy[172]ft:px[178]p1[171]py[172]ft
  66. 440 x[178][180](px[171]qx):y[178][180](py[171]qy)
  67. 450 e[178]q[170]x[170]ft[172]y:[139][194](e)[178]sp[176][194](e)[178]uu[167]490
  68. 460 e[178]q[170]x:[139][194](e)[178]sp[176][194](e)[178]uu[167]y[178]0:[137]490
  69. 470 e[178]q[170]ft[172]y:[139][194](e)[178]sp[176][194](e)[178]uu[167]x[178]0:[137]490
  70. 480 x[178]0:y[178]0
  71. 490 q[178]q[170]x[170]ft[172]y:[151]q,gg:[151]q0,sp
  72. 500 [142]
  73. 510 [129]t[178]1[164]1500:[130]
  74. 520 [153]"load";[163]15);"you lose!":bb[178]bb[170]1
  75. 530 [137]550
  76. 540 [153]"load";[163]15);"you win!":vv[178]vv[170]1
  77. 550 [151]198,0
  78. 551 [129]x[178]1[164]3000:[130]
  79. 552 [161]t$:[139]t$[179][177]""[167]110
  80. 553 [128]
  81. 560 [153]"sysload           elephant hunt"
  82. 570 [153]"           valvalvalvalvalvalvalvalvalvalvalvalval"
  83. 580 [153]"  you have to make your way through
  84. 590 print"a jungle to your home, marked '+'.
  85. 600 [153]"however, there is one slight problem;
  86. 610 print"angry,hungry elephants like eating
  87. 620 [153]"people for tea. an elephant looks like
  88. 630 print"this: '[209]' and you look like this: '[211]'
  89. 640 [153]"trees look like this: 'spc(' , and you
  90. 650 print"cannot walk through or climb them.
  91. 660 [153]"beware-the elephants often hide in the
  92. 670 print"trees to catch you unawares!
  93. 680 [153][163]7)"press any key to continuewait
  94. 690 gett$:ift$=""then690
  95. 710 print"[147]you move using these keys:
  96. 720 [153]"             q w e"
  97. 730 [153]"              (NULL)(NULL)(NULL) "
  98. 740 [153]"             atan(NULL)tand"
  99. 750 [153]"              (NULL)(NULL)(NULL) "
  100. 760 [153]"             z x c"
  101. 770 [153]"to exit from the game, press the [stop]
  102. 780 print"key during the actual game.
  103. 790 [153]"  beware - the less elephants lurking
  104. 800 print"around, the faster they move !!
  105. 810 [153]"
  106. 820 print"  remember - it's the elephants that 
  107. 830 [153]"are hunting youwait !
  108. 840 printtab(7)"press any key to start[146]
  109. 850 [161]t$:[139]t$[178]""[167]850
  110. 870 [142]
  111.